<?php
class PhotoLoveModel extends Model{
	public function getPhotoLove($artifactId){
		$map['photoid'] = $artifactId;
		$result = $this->where($map)->order('cTime DESC')->limit("0,16")->findAll();
		if($result){
			return $result;
		}else{
			return array();
		}
	}  
	
	public function getMeLike($uid,$all=false){
        $map['uid'] = $uid;
        if($all){
        	$result = $this->where($map)->findAll();
        }else{
        	$result = $this->where($map)->limit("0,16")->findAll();
        }
        if($result){
            return $result;
        }else{
            return array();
        }
    }
}
?>